package com.yswy.backstage.serviceApi.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yswy.backstage.service.PackageManageLogService;
import com.yswy.backstage.service.PackageManageService;
import com.yswy.backstage.service.SsoService;
import com.yswy.backstage.serviceApi.ApiPackageManageService;
import com.yswy.common.enums.TfPlatformEnums;
import com.yswy.common.enums.XtPlatformEnums;
import com.yswy.common.enums.base.TypeEnum;
import com.yswy.common.utils.StringUtils;
import com.yswy.domain.common.BasePojo;
import com.yswy.domain.entity.PackageManage;
import com.yswy.domain.entity.user.User;
import com.yswy.domain.framework.context.CurrentUserContext;
import com.yswy.domain.mapper.PackageManageLogMapper;
import com.yswy.domain.mapper.PackageManageMapper;
import com.yswy.domain.vo.gld.addOrUpate.PackageManageAddOrUpdate;
import com.yswy.domain.vo.gld.list.PackageManageLogList;
import com.yswy.domain.vo.gld.search.PackageManageSearch;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Service;
import org.springframework.util.Assert;

import java.util.List;

import static com.yswy.backstage.utils.CrudUtils.selectCount;
import static com.yswy.common.constants.WarnMsgConstants.NULL_MSG;


@Slf4j
@Service
public class ApiPackageManageServiceImpl extends ServiceImpl<PackageManageMapper, PackageManage>
        implements ApiPackageManageService {
    @Autowired
    private PackageManageLogMapper packageManageLogMapper ;
    @Override
    public PackageManageLogList getLatestPackageVersion(Long projectId, String channel) {
        return packageManageLogMapper.getLatestPackageVersion(projectId, channel  );
    }

}
